package com.adcc.swingui.demo.statusbar;

import java.awt.Container;

import javax.swing.ImageIcon;
import javax.swing.JComponent;

import com.adcc.swingui.base.DefaultStatusBar;
import com.jidesoft.status.ButtonStatusBarItem;
/**
 * 服务器地址状态条
 * 监听服务器状态变化监听器，一旦变化，切换对应图片
 * @author charlie
 *
 */
public class ServerConnectStatusBut extends DefaultStatusBar {
	ButtonStatusBarItem butConnection;
	public ServerConnectStatusBut(Container container) {
		super(container);
	}

	@Override
	protected JComponent build() {
		butConnection = new ButtonStatusBarItem();
        butConnection.setIcon(new ImageIcon("res/images/GreenCircle.gif"));
        butConnection.setToolTip("连接状态:正常");
        butConnection.setPreferredWidth(20);
        //连接状态监听（只监听一次） 连接 绿色   断开  红色
        
		return butConnection;
	}

	@Override
	protected void i18n() {
		// TODO Auto-generated method stub
		
	}

}
